# Maintainer: Christoph Reiter <reiter.christoph@gmail.com>

_realname=wcurl
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=2025.04.20
pkgrel=1
pkgdesc='Simple wrapper around curl to easily download files (mingw-w64)'
arch=(any)
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
url='https://curl.se/wcurl'
msys2_repository_url='https://github.com/curl/wcurl'
license=(spdx:curl)
depends=(
  bash
  "${MINGW_PACKAGE_PREFIX}-curl"
)
source=("https://github.com/curl/wcurl/archive/v${pkgver}/wcurl-${pkgver}.tar.gz")
sha256sums=('c40ccf365febca9115611db271b2d6705728fc7efb297df3f2eba70d3a97fa03')

package() {
  cd "wcurl-${pkgver}"
  install -Dm755 wcurl "${pkgdir}${MINGW_PREFIX}/bin/wcurl"
  install -Dm644 wcurl.1 "${pkgdir}${MINGW_PREFIX}/share/man/man1/wcurl.1"
  install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
}

